
package HongKongProcurement.model;

import java.io.Serializable;


/**
 * @ClassName: ResponseResultVO
 * @Description: 请求返回对象
 * @author yangsong
 * @version V1.0.0
 */
public class ResultVO implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /** 返回结果状态码 */
    private int respCode;

    /** 返回结果 */
    private Object respResult = null;

    public ResultVO() {
        this.respCode = 0;
    }

    public ResultVO(int respCode) {
        this.respCode = respCode;
    }

    public ResultVO(int respCode, Object respResult) {
        this.respCode = respCode;
        this.respResult = respResult;
    }
    
    public int getRespCode() {
        return respCode;
    }
    
    public void setRespCode(int respCode) {
        this.respCode = respCode;
    }
    
    public Object getRespResult() {
        return respResult;
    }
    
    public void setRespResult(Object respResult) {
        this.respResult = respResult;
    }
    
    public void error() {
        this.respCode = 1;
    }
    
    public void error(Object respResult) {
        this.respCode = 1;
        this.respResult = respResult;
    }
    
    public void success() {
        this.respCode = 0;
    }
    
    public void success(Object respResult) {
        this.respCode = 0;
        this.respResult = respResult;
    }
    
    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer(512);
        sb.append(super.toString());
        sb.append("\n    respCode=").append(this.respCode);
        sb.append("\n    respResult=").append(this.respResult);
        return super.toString();
    }


    
}
